Add MMQ v2 and generic model adapters - #21
Open
lesj0610 wants to merge 28 commits into
Open
Conversation
lesj0610
marked this pull request as ready for review
June 10, 2026 10:51
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
4 tasks
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
lesj0610
force-pushed
the
lesj/gguf-generic-mmq-v2-combined-20260610
branch
from
June 10, 2026 11:10
363eadb to
7725a04
Compare
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
lesj0610
marked this pull request as draft
June 11, 2026 04:17
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
Signed-off-by: lesj0610 <lesj0610@gmail.com>
lesj0610
marked this pull request as ready for review
June 23, 2026 07:14
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Combine the GGUF plugin work needed for current Gemma4 and Qwen3.6 GGUF serving experiments:
This is a fork-side integration PR only. It is not opened against upstream yet.
1. MMQ v2 Kernel Path
Adds a vLLM-native MMQ v2 CUDA path under the plugin
_C_ggufnamespace.Main changes:
mma_v2.cuh/mmq_v2.cuhdevice helpers,ggml_mul_mat_a8_q4_0_mmq_v2as a reference/test path,ggml_mul_mat_a8_iq4_xs_mmq_v2for dense linear IQ4_XS,ggml_moe_a8_iq4_xs_mmq_v2for MoE IQ4_XS legs,Q4_0 v2 is included to validate the modern MMA path against an already-supported quant type. It does not replace the existing Q4_0 production dispatch in this PR.
2. GGUF Config Resolution
Adds a generic config-source resolver for GGUF models.
Fallback order:
MTP/*.gguf,base_modelfrom GGUF metadata/model card when it points to a valid HF repo,The resolver validates remote base model IDs and disables
trust_remote_codewhen configuration is redirected from a GGUF-derived source. This keeps config discovery generic without trusting code from a repo selected by GGUF metadata.3. Gemma4 and Qwen GGUF Adapters
Adds plugin-side tensor mapping and weight-loading adapters for current GGUF layouts.
Covered paths:
The model-specific logic stays in plugin adapters instead of patching vLLM core model files.
4. GGUF MTP Support
Adds GGUF MTP config and weight loading support for the current Qwen3.6 and Gemma4 GGUF layouts.
Covered paths:
nextn_predict_layers,embedding_length,embedding_length_out, attention head counts, and layer metadata,mtp.layers.*,Gemma4MTPModel,model_config.Test Plan
Test Result
tests/test_plugin.py: 26 passedruff check: passedruff format --check: passedcompileall: passedgit diff --check: passedarchitectures = ['Gemma4MTPModel']model_type = gemma4_assistantnum_hidden_layers = 4mtp_num_hidden_layers = 4hidden_size = 1024backbone_hidden_size = 2816model_type = qwen3_5_moetext.num_hidden_layers = 40mtp_num_hidden_layers = 1num_nextn_predict_layers = 1hidden_size = 2048Local kernel validation from the integration worktree:
top_k=1, all-expert-0 gate matched linear v2 with max diff 0.Notes
AI assistance: Codex and Claude.